from pydantic import BaseModel, Field
from typing import Optional


class GenColumnResponse(BaseModel):
    id: int
    name: str
    comment: Optional[str]
    type: str
    pd_type: str
    default: Optional[str]
    sort: Optional[int]
    length: int
    is_pk: bool
    is_nullable: bool
    gen_business_id: int

    class Config:
        from_attributes = True